package com.sos.core.cards
{
	import com.sos.core.Role;

	public class GoalkeeperCard extends PlayerCard
	{
		
		// -------------------------------------------------------------------------------
		// PROPERTIES
		// -------------------------------------------------------------------------------
		
		public function GoalkeeperCard(kind:CardKind = null)
		{
			// Call ancestor
			super(kind);
			// Init
			_type = CardType.GOALKEEPER;
		}
		
		// -------------------------------------------------------------------------------
		// PRIVATE METHODS
		// -------------------------------------------------------------------------------
		
		// DATA OBJECT IMPLEMENTATION
		
		override protected function fill(data:Object):void
		{
			super.fill(data);
			// Role forcing!
			_role = Role.GOALKEEPER;
		}
		
		// -------------------------------------------------------------------------------
		// PUBLIC METHODS
		// -------------------------------------------------------------------------------
		
		override public function copy(card:Card):void
		{
			super.copy(card);
			// Cast the card
			var goalkeeper:GoalkeeperCard = card as GoalkeeperCard;
			// Copy properties
			_role			= Role.GOALKEEPER;
			_actionText		= goalkeeper.actionText;
			_stats			= goalkeeper.stats.clone();
		}
		
		override public function clone():Card
		{
			var clone:GoalkeeperCard = new GoalkeeperCard();
			clone.copy(this);
			return clone;
		}
		
	}
}